<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/12/15
  Time: 9:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <meta charset="utf-8" />
  <title>公共对话框</title>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <%@include file="./inc/inc_head.jsp" %>

</head>
<body>
  <div class="showcase sweet">
    <h4>Sweet Alert</h4>
    <a href="#" class="btn btn-sm btn-info" onclick="dialog1('success','here is the message.....');">公共对话框</a>
  </div>
</body>
<script>

  function dialog1(status,message){
    var title="";
    switch(status)
    {
      case "success": title='操作成功'; break;
      case "warning": title='警告';break;
      case "error": title='操作失败';break;
    }
    swal(title, message, status);
  }
</script>
</html>
